#!/bin/bash
currentPath=$(cd $(dirname $0) && pwd)
cd ${currentPath}
clear

if test -d ${currentPath}/lyl_build; then
    if [ -n "$1" ]; then
        echo "[lyl_build] rebuild"
        rm -rf ./lyl_build
        mkdir lyl_build
        cd lyl_build
        cmake ..
    else
        echo "[lyl_build] build"
        cd lyl_build
    fi
else
    echo "[lyl_build] first build"
    rm -rf ./lyl_build
    mkdir lyl_build
    cd lyl_build
    cmake ..
fi

make -j24
